@model IEnumerable<Pizzas>

@{
    var pageName = "Pizzas";
    ViewData["Title"] = pageName;
}

<h2>@pageName</h2>

<p>
    <a asp-action="Create" class="btn btn-success">Create New</a>
    @*<a asp-action="Create" class="btn btn-primary">Create New</a>
    <a asp-action="Create" class="btn btn-danger">Create New</a>
    <a asp-action="Create" class="btn btn-default">Create New</a>
    <a asp-action="Create" class="btn btn-info">Create New</a>
    <a asp-action="Create" class="btn btn-success">Create New</a>
    <a asp-action="Create" class="btn btn-warning">Create New</a>*@
</p>
<table class="table">
    <thead>
        <tr>
                <th>
                    @Html.DisplayNameFor(model => model.Name)
                </th>
                <th>
                    @Html.DisplayNameFor(model => model.Price)
                </th>
                <th>
                    @Html.DisplayNameFor(model => model.Description)
                </th>
                <th>
                    @Html.DisplayNameFor(model => model.ImageUrl)
                </th>
                <th>
                    @Html.DisplayNameFor(model => model.IsPizzaOfTheWeek)
                </th>
            <th>
                @Html.DisplayNameFor(model => model.Category)
            </th>
            <th></th>
        </tr>
    </thead>
    <tbody>
@foreach (var item in Model) {
        <tr>
            <td>
                @Html.DisplayFor(modelItem => item.Name)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.Price)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.Description)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.ImageUrl)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.IsPizzaOfTheWeek)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.Category.Name)
            </td>
            <td>
                <a asp-action="Edit" asp-route-id="@item.Id">Edit</a> |
                <a asp-action="Details" asp-route-id="@item.Id">Details</a> |
                <a asp-action="Delete" asp-route-id="@item.Id">Delete</a>
            </td>
        </tr>
}
    </tbody>
</table>
